<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePostageZtosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('postage_ztos', function (Blueprint $table) {
            $table->id();
            $table->integer('store_id')->default(0)->comment('店铺id');
            $table->integer('code')->unsigned()->default(0)->comment('行政区代码');
            $table->string('title')->default('')->comment('名称');
            $table->integer('every')->unsigned()->default(500)->comment('每个续重的重量分隔 , EMS为500g / zto1000g - 单位g');
            $table->integer('first')->unsigned()->default(0)->comment('1000g首重');
            $table->integer('second')->unsigned()->default(0)->comment('续重1000g');
            $table->timestamps();
        });

        DB::statement("ALTER TABLE `postage_ztos` comment '中通邮费表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('postage_ztos');
    }
}
